package com.henry.controller;

import com.henry.vo.R;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: springcloud-demo
 * @description:
 * @author: Henry.zhang
 * @create: 2022-08-20 10:16
 */
@RequestMapping("config")
@RestController
@RefreshScope
public class ConfigTestController {
    /*
    属性列表
    */

    @Value("${tom.name}")
    private String tomName;

    @RequestMapping("test")
    public R testConfig(){
        return R.ok(tomName);
    }


}
